﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp7
{
    public class Book
    {
        private int id;
        private string title;
        private int _price;

        public int Id
        {
            get
            {
                return Id;
            }
            set
            {
                id = value;
            }
        }
        public string Title
        {
            get
            {
                return title;
            }
            set
            {
                title = value;
            }
        }
        public int Price
        {
            get
            {
                return _price;
            }
            set
            {
                _price = value;
            }
        }
        public void Book1()
        {
            Console.WriteLine("书的Id;{0} 书的名称;{1} 书的价格;{2}", this.Id, this.Title, this._price);
        }
        public void SetupBook(int id, string title, int price)
        {
            this.id = id;
            this.title = title;
            _price = price;
        }
    }
}
